<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE HTML PUBLIC "" "">
<f:view xmlns="http://www.w3.org/1999/xhtml" xmlns:f="http://java.sun.com/jsf/core"
	xmlns:w="http://www.apusic.com/jsf/widget" xmlns:layout="http://www.apusic.com/jsf/layout"
	xmlns:h="http://java.sun.com/jsf/html" xmlns:ajax="http://www.apusic.com/jsf/ajax"
	xmlns:c="http://java.sun.com/jstl/core" xmlns:om="http://www.apusic.com/jsf/misc"
	renderKitId="AJAX">
	<w:head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<w:stylesheet src="/css/kmp4.css" type="text/css"></w:stylesheet>
		<w:script src="/javascript/k4.js" type="text/javascript" language="UTF-8"></w:script>
		<script type="text/javascript">							
		 function refreshMainPage(){
	 		var mainFrame=document.getElementById('personPageJsvar_frame');
	 		mainFrame.src=mainFrame.src;
	     }
		</script>
		<om:useBean value="mainBean"></om:useBean>
	</w:head>
	<w:page title="预案管理系统">
		<layout:borderLayout title="main" fitToBody="true" border="false" fit="true" margins="0 5 0 5">
			<layout:panel region="west" id="moduleMenusPanel" jsvar="moduleMenusPanelJsvar"
				collapsible="true" border="false" width="180" title="模块菜单" split="true" minSize="180"
				maxSize="210">
				<layout:accordionLayout animate="false" autoScroll="true" border="false" animFloat="true">
					<layout:panel title="预案管理" autoScroll="true">
						<ajax:updater url="/modules/eop/schnarioMenu.xhtml" style="width:100%;height:100%;" />
					</layout:panel>
					<layout:panel title="事件管理" autoScroll="true">
						<ajax:updater url="/modules/eop/infoMenu.xhtml" style="width:100%;height:100%;" />
					</layout:panel>
					<layout:panel title="系统管理" id="menuPanel" autoScroll="true">
						<ajax:updater id="menuUpdater" jsvar="menuUpdaterJsvar" url="/modules/system/menu.xhtml"
							style="width:100%;height:100%;"/>
					</layout:panel>
				</layout:accordionLayout>
			</layout:panel>
			<layout:panel region="south" height="24" style="background-color: #d0def0" border="false"
				fit="true">
				<w:form>
					<layout:panelGrid columns="3" border="0" cellpadding="0" cellspacing="0" style="width:100%;">
						<layout:cell style="width:40%;">
							<layout:panelGrid columns="4" border="0" cellpadding="2" cellspacing="0">
								<h:outputText value="当前在线用户："></h:outputText>
								<h:outputText id="onlineUserCount" width="100"></h:outputText>
								<h:outputText value="最高在线用户："></h:outputText>
								<h:outputText id="highestOnlineUserCount" width="100"></h:outputText>
							</layout:panelGrid>
						</layout:cell>
						<layout:cell style="width:10%;">
							<w:toolBar>
								<h:outputText value="切换样式："></h:outputText>
								<w:menu id="skin" label="请选择">
									<w:chooseSkin />
								</w:menu>
							</w:toolBar>
						</layout:cell>
					</layout:panelGrid>
				</w:form>
			</layout:panel>
			<layout:panel region="north" height="71" fit="true" border="0">
				<ajax:updater url="/header.xhtml" />
			</layout:panel>
			<layout:panel region="center" border="false" hideBorders="true" fit="true" header="false">
				<layout:tabLayout id="centerPanel" border="false" fit="true" hideBorders="true"
					tabPosition="top" jsvar="centerPanelJsvar" enableTabScroll="true">
					<layout:panel title="首页" id="personalPage" url="/welcome.faces" onactivate="refreshMainPage()"
						border="false" hideBorders="true" header="false" jsvar="personPageJsvar">
					</layout:panel>
				</layout:tabLayout>
			</layout:panel>
		</layout:borderLayout>
	</w:page>
	<script type="text/javascript">
		Ext.onReady(function (){
		   moduleMenusPanelJsvar.on('expand',function(){
		   		var mainPanel = window.top.centerPanelJsvar;
	 			var activeTab = mainPanel.getActiveTab();
	 			var tabFrame = activeTab.getEl().dom.childNodes[0].childNodes[0].childNodes[0];
				var temploc = Ext.get(tabFrame).dom;
				temploc.src = temploc.src;
			});
			moduleMenusPanelJsvar.on('collapse',function(){
				var mainPanel = window.top.centerPanelJsvar;
	 			var activeTab = mainPanel.getActiveTab();
	 			var tabFrame = activeTab.getEl().dom.childNodes[0].childNodes[0].childNodes[0];
				var temploc = Ext.get(tabFrame).dom;
				temploc.src = temploc.src;
			});
		   
		});
		
	</script>
</f:view>